package org.gitman.agentplatform.agent.api.utils;

import org.gitman.agentplatform.agent.api.Agent;
import org.gitman.agentplatform.agent.api.AgentInfo;
import org.gitman.agentplatform.agent.api.Message;
import org.gitman.agentplatform.model.Graph;

public abstract class AbstractAgent implements Agent {
	protected Integer id;
	protected AgentInfo agentInfo;
	protected Graph graph;
	protected String args;
	
	@Override
	public void init(String args) {
		this.args = args;		
	}
	@Override
	public void handleMessage(Message message) {
	}
	@Override
	public Message getMessage() {
		return null;
	}
	public AgentInfo getAgentInfo() {
		return agentInfo;
	}
	public void setAgentInfo(AgentInfo agentInfo) {
		this.agentInfo = agentInfo;
	}
	@Override
	public Integer getId() {
		return id;
	}
	@Override
	public void setId(Integer id) {
		this.id = id;
	}	
	@Override
	public int compareTo(Agent o) {
		return id-o.getId();
	}
	@Override
	public void setGraph(Graph graph) {
		this.graph = graph;
	}
}
